// $ANTLR 3.4 src/vb/week3/calc/CalcChecker.g 2012-05-25 16:21:46

package vb.week3.calc;
import java.util.Set;
import java.util.HashSet;


import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class CalcChecker extends TreeParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "BECOMES", "COLON", "COMMENT", "DIGIT", "DIVIDEBY", "DO", "ELSE", "EQUAL", "GREATEREQUAL", "GREATERTHAN", "IDENTIFIER", "IF", "INTEGER", "KOMMA", "LESSEQUAL", "LESSTHAN", "LETTER", "LOWER", "LPAREN", "MINUS", "NOTEQUAL", "NUMBER", "PLUS", "PRINT", "PROGRAM", "RPAREN", "SEMICOLON", "SWAP", "THEN", "TIMES", "UPPER", "VAR", "WHILE", "WS"
    };

    public static final int EOF=-1;
    public static final int BECOMES=4;
    public static final int COLON=5;
    public static final int COMMENT=6;
    public static final int DIGIT=7;
    public static final int DIVIDEBY=8;
    public static final int DO=9;
    public static final int ELSE=10;
    public static final int EQUAL=11;
    public static final int GREATEREQUAL=12;
    public static final int GREATERTHAN=13;
    public static final int IDENTIFIER=14;
    public static final int IF=15;
    public static final int INTEGER=16;
    public static final int KOMMA=17;
    public static final int LESSEQUAL=18;
    public static final int LESSTHAN=19;
    public static final int LETTER=20;
    public static final int LOWER=21;
    public static final int LPAREN=22;
    public static final int MINUS=23;
    public static final int NOTEQUAL=24;
    public static final int NUMBER=25;
    public static final int PLUS=26;
    public static final int PRINT=27;
    public static final int PROGRAM=28;
    public static final int RPAREN=29;
    public static final int SEMICOLON=30;
    public static final int SWAP=31;
    public static final int THEN=32;
    public static final int TIMES=33;
    public static final int UPPER=34;
    public static final int VAR=35;
    public static final int WHILE=36;
    public static final int WS=37;

    // delegates
    public TreeParser[] getDelegates() {
        return new TreeParser[] {};
    }

    // delegators


    public CalcChecker(TreeNodeStream input) {
        this(input, new RecognizerSharedState());
    }
    public CalcChecker(TreeNodeStream input, RecognizerSharedState state) {
        super(input, state);
    }

    public String[] getTokenNames() { return CalcChecker.tokenNames; }
    public String getGrammarFileName() { return "src/vb/week3/calc/CalcChecker.g"; }


        // idset - a set of declared identifiers.
        private Set<String> idset = new HashSet<String>();   
        
        public boolean  isDeclared(String s)     { return idset.contains(s); }
        public void     declare(String s)        { idset.add(s);             }



    // $ANTLR start "program"
    // src/vb/week3/calc/CalcChecker.g:30:1: program : ^( PROGRAM ( declaration | statement )+ ) ;
    public final void program() throws RecognitionException {
        try {
            // src/vb/week3/calc/CalcChecker.g:31:5: ( ^( PROGRAM ( declaration | statement )+ ) )
            // src/vb/week3/calc/CalcChecker.g:31:9: ^( PROGRAM ( declaration | statement )+ )
            {
            match(input,PROGRAM,FOLLOW_PROGRAM_in_program94); 

            match(input, Token.DOWN, null); 
            // src/vb/week3/calc/CalcChecker.g:31:19: ( declaration | statement )+
            int cnt1=0;
            loop1:
            do {
                int alt1=3;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==VAR) ) {
                    alt1=1;
                }
                else if ( (LA1_0==BECOMES||(LA1_0 >= DIVIDEBY && LA1_0 <= DO)||(LA1_0 >= EQUAL && LA1_0 <= IF)||(LA1_0 >= LESSEQUAL && LA1_0 <= LESSTHAN)||(LA1_0 >= MINUS && LA1_0 <= PRINT)||LA1_0==SWAP||LA1_0==TIMES) ) {
                    alt1=2;
                }


                switch (alt1) {
            	case 1 :
            	    // src/vb/week3/calc/CalcChecker.g:31:20: declaration
            	    {
            	    pushFollow(FOLLOW_declaration_in_program97);
            	    declaration();

            	    state._fsp--;


            	    }
            	    break;
            	case 2 :
            	    // src/vb/week3/calc/CalcChecker.g:31:34: statement
            	    {
            	    pushFollow(FOLLOW_statement_in_program101);
            	    statement();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    if ( cnt1 >= 1 ) break loop1;
                        EarlyExitException eee =
                            new EarlyExitException(1, input);
                        throw eee;
                }
                cnt1++;
            } while (true);


            match(input, Token.UP, null); 


            }

        }
         
            catch (RecognitionException e) { 
                throw e; 
            } 

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "program"



    // $ANTLR start "declaration"
    // src/vb/week3/calc/CalcChecker.g:34:1: declaration : ^( VAR id= IDENTIFIER type ) ;
    public final void declaration() throws RecognitionException {
        CommonTree id=null;

        try {
            // src/vb/week3/calc/CalcChecker.g:35:5: ( ^( VAR id= IDENTIFIER type ) )
            // src/vb/week3/calc/CalcChecker.g:35:9: ^( VAR id= IDENTIFIER type )
            {
            match(input,VAR,FOLLOW_VAR_in_declaration128); 

            match(input, Token.DOWN, null); 
            id=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_declaration132); 

            pushFollow(FOLLOW_type_in_declaration134);
            type();

            state._fsp--;


            match(input, Token.UP, null); 


               if (isDeclared((id!=null?id.getText():null)))
                            throw new CalcException(id, "is already declared");
                        else 
                            declare(id.getText()); 
                    

            }

        }
         
            catch (RecognitionException e) { 
                throw e; 
            } 

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "declaration"



    // $ANTLR start "statement"
    // src/vb/week3/calc/CalcChecker.g:43:1: statement : ( compound_expr | ^( PRINT compound_expr ) | ^( SWAP IDENTIFIER IDENTIFIER ) | ^( DO ( statement )+ WHILE compound_expr ) );
    public final void statement() throws RecognitionException {
        try {
            // src/vb/week3/calc/CalcChecker.g:44:5: ( compound_expr | ^( PRINT compound_expr ) | ^( SWAP IDENTIFIER IDENTIFIER ) | ^( DO ( statement )+ WHILE compound_expr ) )
            int alt3=4;
            switch ( input.LA(1) ) {
            case BECOMES:
            case DIVIDEBY:
            case EQUAL:
            case GREATEREQUAL:
            case GREATERTHAN:
            case IDENTIFIER:
            case IF:
            case LESSEQUAL:
            case LESSTHAN:
            case MINUS:
            case NOTEQUAL:
            case NUMBER:
            case PLUS:
            case TIMES:
                {
                alt3=1;
                }
                break;
            case PRINT:
                {
                alt3=2;
                }
                break;
            case SWAP:
                {
                alt3=3;
                }
                break;
            case DO:
                {
                alt3=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 3, 0, input);

                throw nvae;

            }

            switch (alt3) {
                case 1 :
                    // src/vb/week3/calc/CalcChecker.g:44:9: compound_expr
                    {
                    pushFollow(FOLLOW_compound_expr_in_statement166);
                    compound_expr();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    // src/vb/week3/calc/CalcChecker.g:45:9: ^( PRINT compound_expr )
                    {
                    match(input,PRINT,FOLLOW_PRINT_in_statement177); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_statement179);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 3 :
                    // src/vb/week3/calc/CalcChecker.g:46:9: ^( SWAP IDENTIFIER IDENTIFIER )
                    {
                    match(input,SWAP,FOLLOW_SWAP_in_statement191); 

                    match(input, Token.DOWN, null); 
                    match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_statement193); 

                    match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_statement195); 

                    match(input, Token.UP, null); 


                    }
                    break;
                case 4 :
                    // src/vb/week3/calc/CalcChecker.g:47:9: ^( DO ( statement )+ WHILE compound_expr )
                    {
                    match(input,DO,FOLLOW_DO_in_statement207); 

                    match(input, Token.DOWN, null); 
                    // src/vb/week3/calc/CalcChecker.g:47:14: ( statement )+
                    int cnt2=0;
                    loop2:
                    do {
                        int alt2=2;
                        int LA2_0 = input.LA(1);

                        if ( (LA2_0==BECOMES||(LA2_0 >= DIVIDEBY && LA2_0 <= DO)||(LA2_0 >= EQUAL && LA2_0 <= IF)||(LA2_0 >= LESSEQUAL && LA2_0 <= LESSTHAN)||(LA2_0 >= MINUS && LA2_0 <= PRINT)||LA2_0==SWAP||LA2_0==TIMES) ) {
                            alt2=1;
                        }


                        switch (alt2) {
                    	case 1 :
                    	    // src/vb/week3/calc/CalcChecker.g:47:14: statement
                    	    {
                    	    pushFollow(FOLLOW_statement_in_statement209);
                    	    statement();

                    	    state._fsp--;


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt2 >= 1 ) break loop2;
                                EarlyExitException eee =
                                    new EarlyExitException(2, input);
                                throw eee;
                        }
                        cnt2++;
                    } while (true);


                    match(input,WHILE,FOLLOW_WHILE_in_statement212); 

                    pushFollow(FOLLOW_compound_expr_in_statement214);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;

            }
        }
         
            catch (RecognitionException e) { 
                throw e; 
            } 

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "statement"



    // $ANTLR start "compound_expr"
    // src/vb/week3/calc/CalcChecker.g:50:1: compound_expr : ( ^( BECOMES id= IDENTIFIER compound_expr ) | ^( IF compound_expr compound_expr compound_expr ) | ^( LESSTHAN compound_expr compound_expr ) | ^( LESSEQUAL compound_expr compound_expr ) | ^( GREATERTHAN compound_expr compound_expr ) | ^( GREATEREQUAL compound_expr compound_expr ) | ^( EQUAL compound_expr compound_expr ) | ^( NOTEQUAL compound_expr compound_expr ) | ^( PLUS compound_expr compound_expr ) | ^( MINUS compound_expr compound_expr ) | ^( TIMES compound_expr operand ) | ^( DIVIDEBY compound_expr operand ) | operand );
    public final void compound_expr() throws RecognitionException {
        CommonTree id=null;

        try {
            // src/vb/week3/calc/CalcChecker.g:51:5: ( ^( BECOMES id= IDENTIFIER compound_expr ) | ^( IF compound_expr compound_expr compound_expr ) | ^( LESSTHAN compound_expr compound_expr ) | ^( LESSEQUAL compound_expr compound_expr ) | ^( GREATERTHAN compound_expr compound_expr ) | ^( GREATEREQUAL compound_expr compound_expr ) | ^( EQUAL compound_expr compound_expr ) | ^( NOTEQUAL compound_expr compound_expr ) | ^( PLUS compound_expr compound_expr ) | ^( MINUS compound_expr compound_expr ) | ^( TIMES compound_expr operand ) | ^( DIVIDEBY compound_expr operand ) | operand )
            int alt4=13;
            switch ( input.LA(1) ) {
            case BECOMES:
                {
                alt4=1;
                }
                break;
            case IF:
                {
                alt4=2;
                }
                break;
            case LESSTHAN:
                {
                alt4=3;
                }
                break;
            case LESSEQUAL:
                {
                alt4=4;
                }
                break;
            case GREATERTHAN:
                {
                alt4=5;
                }
                break;
            case GREATEREQUAL:
                {
                alt4=6;
                }
                break;
            case EQUAL:
                {
                alt4=7;
                }
                break;
            case NOTEQUAL:
                {
                alt4=8;
                }
                break;
            case PLUS:
                {
                alt4=9;
                }
                break;
            case MINUS:
                {
                alt4=10;
                }
                break;
            case TIMES:
                {
                alt4=11;
                }
                break;
            case DIVIDEBY:
                {
                alt4=12;
                }
                break;
            case IDENTIFIER:
            case NUMBER:
                {
                alt4=13;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;

            }

            switch (alt4) {
                case 1 :
                    // src/vb/week3/calc/CalcChecker.g:51:9: ^( BECOMES id= IDENTIFIER compound_expr )
                    {
                    match(input,BECOMES,FOLLOW_BECOMES_in_compound_expr239); 

                    match(input, Token.DOWN, null); 
                    id=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_compound_expr243); 

                    pushFollow(FOLLOW_compound_expr_in_compound_expr245);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                       if (!isDeclared((id!=null?id.getText():null)))
                                    throw new CalcException(id, "is not declared");
                            

                    }
                    break;
                case 2 :
                    // src/vb/week3/calc/CalcChecker.g:55:9: ^( IF compound_expr compound_expr compound_expr )
                    {
                    match(input,IF,FOLLOW_IF_in_compound_expr267); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr269);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr271);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr273);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 3 :
                    // src/vb/week3/calc/CalcChecker.g:56:9: ^( LESSTHAN compound_expr compound_expr )
                    {
                    match(input,LESSTHAN,FOLLOW_LESSTHAN_in_compound_expr285); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr287);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr289);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 4 :
                    // src/vb/week3/calc/CalcChecker.g:57:9: ^( LESSEQUAL compound_expr compound_expr )
                    {
                    match(input,LESSEQUAL,FOLLOW_LESSEQUAL_in_compound_expr302); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr304);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr306);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 5 :
                    // src/vb/week3/calc/CalcChecker.g:58:9: ^( GREATERTHAN compound_expr compound_expr )
                    {
                    match(input,GREATERTHAN,FOLLOW_GREATERTHAN_in_compound_expr319); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr321);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr323);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 6 :
                    // src/vb/week3/calc/CalcChecker.g:59:9: ^( GREATEREQUAL compound_expr compound_expr )
                    {
                    match(input,GREATEREQUAL,FOLLOW_GREATEREQUAL_in_compound_expr335); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr337);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr339);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 7 :
                    // src/vb/week3/calc/CalcChecker.g:60:9: ^( EQUAL compound_expr compound_expr )
                    {
                    match(input,EQUAL,FOLLOW_EQUAL_in_compound_expr351); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr353);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr355);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 8 :
                    // src/vb/week3/calc/CalcChecker.g:61:9: ^( NOTEQUAL compound_expr compound_expr )
                    {
                    match(input,NOTEQUAL,FOLLOW_NOTEQUAL_in_compound_expr367); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr369);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr371);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 9 :
                    // src/vb/week3/calc/CalcChecker.g:62:9: ^( PLUS compound_expr compound_expr )
                    {
                    match(input,PLUS,FOLLOW_PLUS_in_compound_expr383); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr385);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr387);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 10 :
                    // src/vb/week3/calc/CalcChecker.g:63:9: ^( MINUS compound_expr compound_expr )
                    {
                    match(input,MINUS,FOLLOW_MINUS_in_compound_expr399); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr401);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_compound_expr_in_compound_expr403);
                    compound_expr();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 11 :
                    // src/vb/week3/calc/CalcChecker.g:64:9: ^( TIMES compound_expr operand )
                    {
                    match(input,TIMES,FOLLOW_TIMES_in_compound_expr415); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr417);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_operand_in_compound_expr419);
                    operand();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 12 :
                    // src/vb/week3/calc/CalcChecker.g:65:9: ^( DIVIDEBY compound_expr operand )
                    {
                    match(input,DIVIDEBY,FOLLOW_DIVIDEBY_in_compound_expr431); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_compound_expr_in_compound_expr433);
                    compound_expr();

                    state._fsp--;


                    pushFollow(FOLLOW_operand_in_compound_expr435);
                    operand();

                    state._fsp--;


                    match(input, Token.UP, null); 


                    }
                    break;
                case 13 :
                    // src/vb/week3/calc/CalcChecker.g:66:9: operand
                    {
                    pushFollow(FOLLOW_operand_in_compound_expr446);
                    operand();

                    state._fsp--;


                    }
                    break;

            }
        }
         
            catch (RecognitionException e) { 
                throw e; 
            } 

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "compound_expr"



    // $ANTLR start "operand"
    // src/vb/week3/calc/CalcChecker.g:69:1: operand : (id= IDENTIFIER |n= NUMBER );
    public final void operand() throws RecognitionException {
        CommonTree id=null;
        CommonTree n=null;

        try {
            // src/vb/week3/calc/CalcChecker.g:70:5: (id= IDENTIFIER |n= NUMBER )
            int alt5=2;
            int LA5_0 = input.LA(1);

            if ( (LA5_0==IDENTIFIER) ) {
                alt5=1;
            }
            else if ( (LA5_0==NUMBER) ) {
                alt5=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 5, 0, input);

                throw nvae;

            }
            switch (alt5) {
                case 1 :
                    // src/vb/week3/calc/CalcChecker.g:70:9: id= IDENTIFIER
                    {
                    id=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_operand475); 

                       if (!isDeclared((id!=null?id.getText():null)))
                                    throw new CalcException(id, "is not declared");
                            

                    }
                    break;
                case 2 :
                    // src/vb/week3/calc/CalcChecker.g:74:9: n= NUMBER
                    {
                    n=(CommonTree)match(input,NUMBER,FOLLOW_NUMBER_in_operand498); 

                    }
                    break;

            }
        }
         
            catch (RecognitionException e) { 
                throw e; 
            } 

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "operand"



    // $ANTLR start "type"
    // src/vb/week3/calc/CalcChecker.g:77:1: type : INTEGER ;
    public final void type() throws RecognitionException {
        try {
            // src/vb/week3/calc/CalcChecker.g:78:5: ( INTEGER )
            // src/vb/week3/calc/CalcChecker.g:78:9: INTEGER
            {
            match(input,INTEGER,FOLLOW_INTEGER_in_type521); 

            }

        }
         
            catch (RecognitionException e) { 
                throw e; 
            } 

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "type"

    // Delegated rules


 

    public static final BitSet FOLLOW_PROGRAM_in_program94 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_declaration_in_program97 = new BitSet(new long[]{0x0000000A8F8CFB18L});
    public static final BitSet FOLLOW_statement_in_program101 = new BitSet(new long[]{0x0000000A8F8CFB18L});
    public static final BitSet FOLLOW_VAR_in_declaration128 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_IDENTIFIER_in_declaration132 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_type_in_declaration134 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_compound_expr_in_statement166 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PRINT_in_statement177 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_statement179 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_SWAP_in_statement191 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_IDENTIFIER_in_statement193 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_statement195 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_DO_in_statement207 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_statement_in_statement209 = new BitSet(new long[]{0x000000128F8CFB10L});
    public static final BitSet FOLLOW_WHILE_in_statement212 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_statement214 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_BECOMES_in_compound_expr239 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_IDENTIFIER_in_compound_expr243 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr245 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_IF_in_compound_expr267 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr269 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr271 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr273 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_LESSTHAN_in_compound_expr285 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr287 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr289 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_LESSEQUAL_in_compound_expr302 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr304 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr306 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_GREATERTHAN_in_compound_expr319 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr321 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr323 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_GREATEREQUAL_in_compound_expr335 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr337 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr339 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_EQUAL_in_compound_expr351 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr353 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr355 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_NOTEQUAL_in_compound_expr367 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr369 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr371 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_PLUS_in_compound_expr383 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr385 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr387 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_MINUS_in_compound_expr399 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr401 = new BitSet(new long[]{0x00000002078CF910L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr403 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_TIMES_in_compound_expr415 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr417 = new BitSet(new long[]{0x0000000002004000L});
    public static final BitSet FOLLOW_operand_in_compound_expr419 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_DIVIDEBY_in_compound_expr431 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_compound_expr_in_compound_expr433 = new BitSet(new long[]{0x0000000002004000L});
    public static final BitSet FOLLOW_operand_in_compound_expr435 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_operand_in_compound_expr446 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_operand475 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NUMBER_in_operand498 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INTEGER_in_type521 = new BitSet(new long[]{0x0000000000000002L});

}